package com.allwees.data.analysis.refund.api;

import com.allwees.bs.core.modelbase.vo.R;
import com.allwees.data.analysis.base.api.BaseAnalysisApi;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 *
 *
 * @author yangylsky
 * @since 2020-04-07
 *
 */
@RestController
@RequestMapping("/data/api/analysis/refund")
public class RefundApi extends BaseAnalysisApi {
    @GetMapping("/refund_user")
    public R refundUser(Date dateFrom, Date dateTo) {
        return R.ok(query("refund/REFUND_USER.txt", dateFrom, dateTo));
    }

    @GetMapping("/refund_num")
    public R refundNum(Date dateFrom, Date dateTo) {
        return R.ok(query("refund/REFUND_NUM.txt", dateFrom, dateTo));
    }

    @GetMapping("/refund_amt")
    public R refundAmt(Date dateFrom, Date dateTo) {
        return R.ok(query("refund/REFUND_AMT.txt", dateFrom, dateTo));
    }

    @GetMapping("/refund_detail")
    public R refundDetail(Date dateFrom, Date dateTo) {
        return R.ok(query("refund/REFUND_DETAIL.txt", dateFrom, dateTo));
    }
}
